﻿// <copyright file="ExecutedEventArgs.cs" company="Ucaya">
// </copyright>
// <author>Ucaya</author>

namespace Channel9Kinect.Input
{
    #region

    using System;

    #endregion

    public class ExecutedEventArgs : EventArgs
    {
        #region Constructors and Destructors

        /// <summary>
        ///   Initializes a new instance of the <see cref = "ExecutedEventArgs" /> class.
        /// </summary>
        /// <param name = "command">The command.</param>
        /// <param name = "parameter">The parameter.</param>
        internal ExecutedEventArgs(Command command, object parameter)
        {
            this.Command = command;
            this.Parameter = parameter;
        }

        #endregion

        #region Public Properties

        /// <summary>
        ///   Gets the command that was invoked.
        /// </summary>
        /// <value>The command associated with this event.</value>
        public Command Command { get; private set; }

        /// <summary>
        ///   Gets data parameter of the command.
        /// </summary>
        /// <value>The command data. The default value is null.</value>
        public object Parameter { get; private set; }

        #endregion
    }

    public class ExecutedEventArgs<T> : EventArgs
    {
        #region Constructors and Destructors

        /// <summary>
        ///   Initializes a new instance of the <see cref = "ExecutedEventArgs" /> class.
        /// </summary>
        /// <param name = "command">The command.</param>
        /// <param name = "parameter">The parameter.</param>
        internal ExecutedEventArgs(Command<T> command, T parameter)
        {
            this.Command = command;
            this.Parameter = parameter;
        }

        #endregion

        #region Public Properties

        /// <summary>
        ///   Gets the command that was invoked.
        /// </summary>
        /// <value>The command associated with this event.</value>
        public Command<T> Command { get; private set; }

        /// <summary>
        ///   Gets data parameter of the command.
        /// </summary>
        /// <value>The command data. The default value is null.</value>
        public T Parameter { get; private set; }

        /// <summary>
        ///   Gets the element that raises the event.
        /// </summary>
        /// <value>The event source.</value>
        public object Source { get; private set; }

        #endregion
    }
}